#!/usr/bin/env bash
WOBSOCK="$XDG_RUNTIME_DIR"/wob.sock

to_wob() {
  light -G | cut -d'.' -f1 > "$WOBSOCK"
}


case $1 in
  increase)
    light -A 5 && to_wob
    ;;
  decrease)
    light -U 5 && to_wob
    ;;
  *)
    echo "$XDG_CONFIG_HOME/$0: The argument is not found."
esac